<?php
/*
* Copyright (c) 2010 by Cediti
*
* You may distribute under the terms of either the GNU Lesser General
* Public License or the new BSD License, as specified in the README file.
*/
// created :	18 March 2010
// version :	18 March 2010

class Cmis_XmlTemplates extends Templates
{
	public function __construct($separators = array('#','#','.'))
	{
		parent::__construct(dirname(__FILE__) . '/resources/xml/', $separators);
	}

	/**
	 * Create a xml files from a list of block
	 * @param ... $blocks should be sorted in the way of rendered
	 * @return string
	 */
	public function createFromBlocks()
	{
		$blocks = func_get_args();
		$rendered = '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>' . "\r\n";
		foreach($blocks as $block)
		{
			$rendered .= $this->render($block) . "\r\n";
		}
		return $rendered;
	}
}

# EOF
